package io.seata.samples.tcc.springboot.dubbo.service.impl;

import io.seata.samples.tcc.springboot.dubbo.service.ActionTwoService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.stereotype.Component;

@Component
@Service(version = "1.0.0", group = "tcc")
public class ActionTwoServiceImpl implements ActionTwoService {

    @Override
    public String prepare(String param) {
        String result = ":::: action-two-provider prepare, rpc called success, param:" + param + ".";
        System.out.println(result);
        return result;
    }

    @Override
    public String commit(String param) {
        String result = ":::: action-two-provider commit, rpc called success, param:" + param + ".";
        System.out.println(result);
        return result;
    }

    @Override
    public String rollback(String param) {
        String result = ":::: action-two-provider rollback, rpc called success, param:" + param + ".";
        System.out.println(result);
        return result;
    }
}
